{% extends 'base.html' %}

{% block title %}
    登录
{% endblock %}

{% block main %}
    <div style="max-width: 330px;" class="m-auto">
        <h1>登录页面</h1>
        <form action="" method="post">
            {% csrf_token %}
            <div class="mb-3">
                <label>邮箱</label>
                <input type="email" name="email" class="form-control" placeholder="请输入邮箱">
            </div>
            <div class="mb-3">
                <label>密码</label>
                <input type="password" name="password" class="form-control" placeholder="请输入密码">
            </div>
            <div class="form-check mb-3">
                <input class="form-check-input" type="checkbox" name="remember" value="1" id="flexCheckDefault">
                <label class="form-check-label" for="flexCheckDefault">
                    记住我
                </label>
            </div>
            {% if form %}
                <div class="mb-1 w-100" style="color: red">
                    邮箱或密码错误
                </div>
            {% endif %}
            <div class="mb-3">
                <button class="btn btn-primary w-100">登录</button>
            </div>
        </form>
    </div>
{% endblock %}